A Hamming distance is a measurement of two digital words indicating the number of bit positions that have differing values between the two digital words. Hamming distance calculations are useful as a distance measure in applications such as Viterbi decoding. In such applications, the accuracy of the Hamming distance calculation can decrease as the number of differing bit positions increases. For a Hamming distance calculation of large digital words, such as 24 bits in length, the result only needs to be accurate when the number of different bits is small and can saturate after the count of differing bits exceeds, for example, 8.
With such a specification, a pure digital implementation of a Hamming distance algorithm requires 24 3-bit saturating half-adders in each of the 24 stages. If carry look ahead methods are not used, the digital implementation would require carry propagate circuitry of 72 stages. The resulting pure digital implementation would thus be area inefficient as well as slow in operation.
Traditional analog Hamming distance calculation devices use a comparator to compare an input voltage signal to a reference voltage signal at a specific first clock cycle. A difference voltage signal is established and amplified. The difference voltage signal is applied to the comparator at a second clock signal. This process is repeated until the Hamming distance is determined. However, the traditional analog-to-digital device with successive approximation approach is limited by how fast the comparator can be clocked and how much setting time is required for the comparator. Also, a high precision comparator is needed to operate in conjunction with proper clocking requirements. Therefore, it is desirable to perform a Hamming distance calculation in a more device efficient and timely manner.